﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="DoAnWeb.Default" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
         <title>Trang chủ</title>
         </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
     
        <asp:DataList ID="dlDanhSach" runat="server" HorizontalAlign="Center" 
            RepeatColumns="3" 
            RepeatDirection="Horizontal" CellPadding="5" CellSpacing="15" 
            EnableTheming="True" CssClass="Container"   >
            <EditItemStyle Wrap="True" />
            <ItemStyle BorderStyle="None" 
                 VerticalAlign="Top" CssClass="SanPham"   />
            <ItemTemplate>
                    <asp:Panel ID="Panel1" runat="server" CssClass="SanPham">
                        <asp:HyperLink ID="HyperLink2" runat="server" CssClass="TieuDe" 
                            NavigateUrl='<%# "ProductDetails.aspx?proID=" + Eval("MaTinKhuyenMai") %>' 
                            Text='<%# Eval("TieuDe") %>'></asp:HyperLink>
                        <br />
                        <br />
                        <br />
                        <div class="gallery">
                            <asp:HyperLink ID="HyperLink3" runat="server" 
                                ImageUrl='<%# "~/images/Cat/Thumb/"+Eval("HinhAnh") %>' 
                                NavigateUrl='<%# "~/images/Cat/"+Eval("HinhAnh") %>'>HyperLink</asp:HyperLink>
                        </div>
                        <br />
                        <table cellpadding="0" cellspacing="0" class="style1">
                            <tr>
                                <td style="border-right-style: solid; border-right-width: 2px; border-right-color: #009933;" 
                                    valign="top" class="ThongTinGia">
                                    Giá gốc:&nbsp;<asp:Label ID="Label4" runat="server" Font-Strikeout="True" ForeColor="Red" 
                                        Text='<%# string.Format("{0:#,#.##}",Eval("GiaGoc"))+"vnđ" %>'></asp:Label>
                                    &nbsp;<asp:Label ID="Label7" runat="server" Font-Bold="True" Font-Size="Large" 
                                        ForeColor="#0066FF" Text='<%# "-"+Eval("PhanTramKhuyenMai")+"%" %>'></asp:Label>
                                    <br />
                                    Giá bán:
                                    <asp:Label ID="Label5" runat="server" ForeColor="Red" 
                                        Text='<%# string.Format("{0:#,#.##}",Eval("GiaBan"))+"vnđ" %>'></asp:Label>
                                    <br />
                                    Tình trạng:
                                    <asp:Label ID="Label10" runat="server" ForeColor="#0066FF" Text="Còn hàng" 
                                        Visible='<%# TinhTrang(Convert.ToInt32(Eval("MaTinKhuyenMai").ToString())) %>'></asp:Label>
                                    <asp:Label ID="Label11" runat="server" ForeColor="Red" Text="Hết hàng" 
                                        Visible='<%# !TinhTrang(Convert.ToInt32(Eval("MaTinKhuyenMai").ToString())) %>'></asp:Label>
                                    <br />
                                </td>
                                <td valign="top" width="100">
                                    <table cellpadding="0" cellspacing="0" class="style1">
                                        <tr>
                                            <td class="LuotThamGiaTieuDe">
                                                <asp:Label ID="Label12" runat="server" Font-Bold="False" Text="Lượt tham gia"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="SoLuotThamGia">
                                                <br />
                                                <asp:Label ID="Label13" runat="server" 
                                                    Text='<%# SoLuotThamGia(Convert.ToInt32(Eval("MaTinKhuyenMai").ToString())) %>'></asp:Label>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </asp:Panel>
            </ItemTemplate>
        </asp:DataList>
       
     
</asp:Content>
